package com.mercury.ec.module.air.controller.admin.order.vo.orderpassenger;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mercury.ec.framework.excel.core.annotations.DictFormat;
import com.mercury.ec.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

import static com.mercury.ec.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

@Schema(description = "管理后台 - 机票订单乘客 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AirOrderPassengerRespVO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23606")
    @ExcelProperty("id")
    private Long id;

    @Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1949")
    @ExcelProperty("订单id")
    private Long orderId;

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("序号")
    private Integer serialNo;

    @Schema(description = "原订单乘客id", example = "16640")
    private Long originOrderPassengerId;

    @Schema(description = "乘客类型 字典（system_passenger_type 1-成人/2-儿童/3-婴儿）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "乘客类型 字典（system_passenger_type 1-成人/2-儿童/3-婴儿）", converter = DictConvert.class)
    @DictFormat("system_passenger_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer type;

    @Schema(description = "国家代码 见表（basic_country.no）", requiredMode = Schema.RequiredMode.REQUIRED, example = "CN")
    @ExcelProperty("国家代码 见表（basic_country.no）")
    private String countryNo;

    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("姓名")
    private String name;

    @Schema(description = "性别 字典（system_user_sex）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "性别 字典（system_user_sex）", converter = DictConvert.class)
    @DictFormat("system_user_sex") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer sex;

    @Schema(description = "证件类型 字典（system_card_type）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "证件类型 字典（system_card_type）", converter = DictConvert.class)
    @DictFormat("system_card_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer cardType;

    @Schema(description = "证件号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("证件号")
    private String cardNo;

    @Schema(description = "证件有效期")
    @ExcelProperty("证件有效期")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate cardValidDate;

    @Schema(description = "证件签发国家代码 见表（basic_country.no）", requiredMode = Schema.RequiredMode.REQUIRED, example = "CN")
    @ExcelProperty("证件签发国家代码 见表（basic_country.no）")
    private String cardIssuingCountryNo;

    @Schema(description = "出生日期")
    @ExcelProperty("出生日期")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate birthday;

    @Schema(description = "是否携带婴儿")
    @ExcelProperty(value = "是否携带婴儿", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean haveBaby;

    @Schema(description = "监护人姓名", example = "赵六")
    @ExcelProperty("监护人姓名")
    private String guardianName;

    @Schema(description = "手机号")
    @ExcelProperty("手机号")
    private String mobile;

    @Schema(description = "邮箱")
    @ExcelProperty("邮箱")
    private String email;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "是否发送短信", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "是否发送短信", converter = DictConvert.class)
    @DictFormat("infra_boolean_string") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean sendSms;

    @Schema(description = "GP验证类型 字典（air_gp_check_type 1-公务卡/2-预算单位）", example = "1")
    private Integer gpCheckType;

    @Schema(description = "GP公务卡发卡银行 字典（system_bank）", example = "1")
    private Integer gpBank;

    @Schema(description = "GP预算公司", example = "")
    private String gpBudgetCorp;
}
